export default {
    computed: {
        layout() {
            if (this.data.scbj === '1') {
                return `addtime`;
            }

            if (this.data.ismine) {
                return `addtime,comment,like,del`;
            }

            return `addtime,comment,like`
        },
    },
    methods: {
        commentSubmitHandler(data) {
            this.$emit('update');
        },
        delHandler() {
            this.$post(`${this.$store.state.api.tbUrl}/comment/delete.json`, {
                guid: this.data.guid,
            }, data => {
                this.commentSubmitHandler();
            });
        },
    },
};